<{include file='customer/head.html'}>
<body>
	<div class="akrPop">
		<form id="sub_form">
			<ul class="ulForm">
				<li>
					<label class="form-label">登录名称：</label>
					<div class="form-input">
						<input type="text" class="inputText" readonly name="name" value="<{$list.name}>">
					</div>
				</li>
				<li>
					<label class="form-label">显示名称：</label>
					<div class="form-input">
						<input type="text" class="inputText" name="displayname" value="<{$list.displayname}>">
					</div>
				</li>
				<li>
					<label class="form-label">手机号码：</label>
					<div class="form-input">
						<input type="text" class="inputText" name="mobile" value="<{$list.mobile}>">
					</div>
				</li>
				<li>
					<label class="form-label">密码：</label>
					<div class="form-input">
						<input type="password" class="inputText" name="pwd" value="">
						<div class="form-word">密码为空,则为原密码</div>
					</div>
				</li>
				<li>
					<label class="form-label">确认密码：</label>
					<div class="form-input">
						<input type="password" class="inputText" name="pwdok" value="">
					</div>
				</li>
				<li>
					<label class="form-label">上传头像：</label>
					<div class="form-input">
						<div class="dib hcinits_uploads_file_imgshow" <{if $list.face==''}> style="display: none;" <{/if}> >
			                <img style="width: 100px;height: 56px;" class="hcinits_uploads_file_face_images" src="<{$list.face}>" />
			            </div>
			            <div class="akrfile">选择图片
				            <input type="hidden" class="hcinits_uploads_file_face_name" name="face" value="<{$list.face}>">
							<div class="hcinits_uploads_file" id="uploadone"></div>
						</div>
					</div>
				</li>
				<li>
					<label class="form-label">性别：</label>
					<div class="form-input">
						<dl class="label_beauty">
							<dd>
								<input type="radio" name="sex" id="sex_male" <{if $list.sex=='男'}> checked <{/if}> value="男" >
								<label for="sex_male">男</label>
							</dd>
							<dd>
								<input type="radio" name="sex" id="sex_female" <{if $list.sex=='女'}> checked <{/if}> value="女" >
								<label for="sex_female">女</label>
							</dd>
						</dl>
					</div>
				</li>
				<li>
					<div class="form-input">
						<input type="hidden" name="id" value="<{$list.id}>">
						<input type="button" class="sub_form_botton akrBtn akrBtn-md blue" value="提交">
					</div>
				</li>
			</ul>
		</form>
	</div>
<script type="text/javascript">
	//上传单张图片
	function uploadimgone(){
		var postdata={savePath:'face'};
		var uploadid='uploadone';
		var formAction='/Ups/imageone';
		_hcinits.init(['_upload_min','_layer_admin_min'],function(){
			_layer_admin=_hcinits._layer_admin;
			_uploadfile=_hcinits._uploadfile;
			_uploadfile.initdiv({'upId':uploadid,'formAction':formAction},postdata,function(returnback){
				data=returnback[0];
            	data=JSON.parse(data);
            	console.log(data);
            	if(data.status){
            		_layer_admin.successMsg(data.message,function(){
            			$('.hcinits_uploads_file_imgshow').show();
            			$('.hcinits_uploads_file_face_name').val(data.img);
            			$('.hcinits_uploads_file_face_images').attr('src',data.imgshow);
            		});
            	}else{
            		_layer_admin.errorMsg(data.message);
            	}
			});
		})
	}
	uploadimgone();
	//上传结束
	$(function(){
		//添加提交
		$('.sub_form_botton').click(function(){
			_hcinits.init(['_ajaxs_min','_layer_admin_min'],function(){
				_ajaxs=_hcinits._ajaxs;
				_layer_admin=_hcinits._layer_admin;
				 postdata=_ajaxs.from('#sub_form');
				_ajaxs.post('/UserCurrentInfo/UserCurrentInfoEdit',postdata,function(data){
					if(data.status){
						_layer_admin.successMsg(data.message,3)
					}else{
						_layer_admin.errorMsg(data.message);
					}
				})
			})
		})
	})
</script>
</body>
 
</html>